public class MCThread
  implements Runnable
{
  private boolean D = false;
  private gi F;
  private boolean I = false;
  private boolean J = false;
  private boolean KKLI = false;
  private boolean L = false;
  private boolean O = false;
  private Status aA = Status.C;
  private Direction aG = Direction.I;

  public MCThread(gi paramgi)
  {
    this.F = paramgi;
  }

  //1.2.2 - g = lr
  //1.2.4 - g = lu
  public final void run()
  {
    while (this.D)
    {
      if (F())
      {
        long l = this.F.e.e; //unchanged.
        if (this.L)
        {
          this.F.g.aH = true; //On Ground?
          this.F.g.aU = 0.0F; //Fall distance.
        }
        if (this.O)
          this.F.g.aA = 0.0D;
        if (this.I)
        {
            //he.class
            //Last function, a(byte), accepts a byte from the server to determin death.
          this.F.g.J = 20; //Health
          this.F.g.L = 0; //HurtTime
          this.F.g.O = 0; //DeathTime
        }
        if (this.J)
          this.F.g.bk = 300;
        if (this.KKLI)
          this.F.g.bg = 0;
        if (!this.aG.equals(Direction.I))
        {
          if (this.aG.equals(Direction.Z))
            this.F.g.az = -0.5D;
          if (this.aG.equals(Direction.C))
            this.F.g.aB = -0.5D;
          if (this.aG.equals(Direction.B))
            this.F.g.az = 0.5D;
          if (this.aG.equals(Direction.D))
            this.F.g.aB = 0.5D;
        }
        if (this.aA.equals(Status.I))
        {
          if (l % 24000L >= 12000L)
            this.F.e.e = ((l / 24000L + 1L) * 24000L);
        }
        else if ((this.aA.equals(Status.Z)) && (l % 24000L < 12000L))
          this.F.e.e = ((l / 24000L + 1L) * 24000L + 16000L);
      }
      D(10);
    }
  }

  public final void I()
  {
    this.D = true;
    new Thread(this).start();
  }

  private static void D(int paramInt)
  {
    try
    {
      Thread.sleep(paramInt);
    }
    catch (InterruptedException localInterruptedException)
    {
    }
  }

  public final void I(boolean paramBoolean)
  {
    if (paramBoolean)
      this.I = true;
    else
      this.I = false;
  }

  public final void Z(boolean paramBoolean)
  {
    if (paramBoolean)
      this.J = true;
    else
      this.J = false;
  }

  public final void C(boolean paramBoolean)
  {
    if (paramBoolean)
      this.KKLI = true;
    else
      this.KKLI = false;
  }

  public final void B(boolean paramBoolean)
  {
    if (paramBoolean)
      this.L = true;
    else
      this.L = false;
  }

  public final void D(boolean paramBoolean)
  {
    if (paramBoolean)
      this.O = true;
    else
      this.O = false;
  }

  public final void I(Direction paramDirection)
  {
    this.aG = paramDirection;
  }

  public final void I(Status paramStatus)
  {
    this.aA = paramStatus;
  }

  private boolean F()
  {
    return (this.F.e != null) && (this.F.g != null) && (this.F.g.e != null);
  }
}